<form class="form-horizontal" action="<?php echo url::base(true);?>supplier/supplierSku/update_save" name="form1" onsubmit="return checkForm();" method="post">
    <div class="control-group">
        <label class="control-label">供应商id:</label>
        <div class="controls">
            <span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
            <input id="search1" type="text" name="supplierid" value="<?php echo $data['supplier_id'];?>" class="ui-autocomplete-input"  readonly>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">SKU:</label>
        <div class="controls">
            <input type="text" name="sku" value="<?php echo $data['sku'];?>" readonly>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">名称:</label>
        <div class="controls">
            <input type="text" name="productname" value="<?php echo $data['productname'];?>" required>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">出口退税:</label>
        <div class="controls">
            <select name="export_tax_rebate">
                <option value="0" <?php echo $data['export_tax_rebate']==0?'selected="selected"':''?>>否</option>
                <option value="1" <?php echo $data['export_tax_rebate']==1?'selected':''?>>是</option>
            </select>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">加点税率:</label>
        <div class="controls">
            <input type="text" name="real_tax_rate" value="<?php echo $data['real_tax_rate'];?>" required>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">单价:</label>
        <div class="controls">
            <input type="text" name="price" value="<?php echo $data['price'];?>"  required>
        </div>
    </div>

    <div class="control-group">
        <label class="control-label">规格:</label>
        <div class="controls">
            <input type="text" name="size" value="<?php echo $data['size'];?>">
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">单位:</label>
        <div class="controls">
            <input type="text" name="nuit" value="<?php echo $data['nuit'];?>" required>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">交期:</label>
        <div class="controls">
            <input type="text" name="delivery" value="<?php echo $data['delivery'];?>" required>
        </div>
    </div>
    <div class="control-group">
        <label class="control-label">备注:</label>
        <div class="controls">
            <textarea name="remark" rows="5"><?php echo $data['remark'];?></textarea>
        </div>
    </div>
    <div class="control-group">
        <div class="controls">
            <input type="hidden" name="id" value="<?php echo $data['id'];?>">
            <input type="hidden" name="link" value="<?php echo $link;?>">
             <input class="btn btn-info" type="submit" name="sub" value="提交修改">
        </div>
    </div>
</form>
<script src="<?php echo URL::base() ?>media/layer/layer.js"></script>
<script>
    function checkForm() {
        if(!/^\d+(\.\d{0,5})?$/.test($('input[name=price]').val())){
            layer.alert('单价格式不对',{icon:5});
            return false;
        }
        if(!/^\w+?$/.test($('input[name=sku]').val())){
            layer.alert('Sku格式不对',{icon:5});
            return false;
        }
        return true;
    }
</script>